package activity.myrecyclerview;

import android.app.Activity;
import android.content.Intent;
import android.view.View;
import android.widget.Button;

import org.androidannotations.annotations.Click;
import org.androidannotations.annotations.EActivity;
import org.androidannotations.annotations.NoTitle;
import org.androidannotations.annotations.ViewById;

@NoTitle
@EActivity(R.layout.activity_main)
public class MainActivity extends Activity {
    private Intent intent;
    @ViewById(R.id.recyclerView)
    public Button recyclerView;
    @ViewById(R.id.cardview)
    public Button cardview;
    @ViewById(R.id.toolbar)
    public Button toolbar;
    @ViewById(R.id.content)
    public Button content;

    @Click({R.id.recyclerView, R.id.cardview,R.id.toolbar,R.id.content})
    public void btn(View view) {
        switch (view.getId()) {
            case R.id.recyclerView:
                intent = new Intent(this, RecyclerActivity_.class);
                break;
            case R.id.cardview:
                intent = new Intent(this, CardViewActivity_.class);
                break;
            case R.id.toolbar:
                intent=new Intent(this,ToolBarActivity_.class);
                break;
            case R.id.content:
                intent=new Intent(this,ContentActivity_.class);
                break;
        }
        startActivity(intent);
    }
}
